package com.usf.jprovider.schema.selector.value.split;

import com.usf.jprovider.object.JObjectNode;
import com.usf.jprovider.object.env.Environment;

public final class SplitLastValue extends AbstractSplitValue {

	public SplitLastValue() {
		super();
	}

	@Override
	protected int index(Environment env, JObjectNode node, int size) {
		return size - 1;
	}
	@Override
	protected int startIndex(Environment env, JObjectNode node, int size) {
		return index(env, node, size);
	}
	@Override
	protected int endIndex(Environment env, JObjectNode node, int size) {
		return index(env, node, size);
	}	
	@Override
	public String toQuery(String column) {
		return "LIKE '%" + column + "'";
	}
	
}
